<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="../lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>添加商户</title>
<script type="text/javascript" src="../lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="../lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="../static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="../static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="../lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript" src="../lib/jqueryPage/paging.min.js"></script>
<script type="text/javascript" src="../lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="../lib/laypage/1.2/laypage.js"></script>
<script src="../lib/jrender.min.js" type="text/javascript"></script>

<script src="../js/config.js"></script>
<script>
	
</script>
</head>
<body>
<article class="page-container">
	<form class="form form-horizontal" id="form-admin-add">
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>商户号：</label>		
		<div class="formControls col-xs-4 col-sm-5">
			<!--<input type="text" class="input-text" value="" placeholder="商户号" id="userMerchantNo" name="userMerchantNo" disabled="disabled">-->
			<span value="" id="userMerchantNo"></span>
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>账号：</label>
		<div class="formControls col-xs-4 col-sm-5">
			<input type="text" class="input-text" autocomplete="off" value="" placeholder="账号" id="account" name="account" disabled="disabled" >
		</div>
	</div>
	<!--<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>身份证姓名：</label>
		<div class="formControls col-xs-4 col-sm-5">
			<input type="text" class="input-text inputDisabled" autocomplete="off" value="" placeholder="身份证姓名" id="userName" name="userName" >
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>身份证号：</label>
		<div class="formControls col-xs-4 col-sm-5">
			<input type="text" class="input-text inputDisabled" autocomplete="off"  placeholder="身份证号" id="id" name="id" >
		</div>
	</div>-->
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>邮箱：</label>
		<div class="formControls col-xs-4 col-sm-5">
			<input type="text" class="input-text inputDisabled"   placeholder="邮箱" id="mailbox" name="mailbox" >
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>电话：</label>
		<div class="formControls col-xs-4 col-sm-5">
			<input type="text" class="input-text inputDisabled"   placeholder="电话" id="phone" />
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>ICP备案登记号：</label>
		<div class="formControls col-xs-4 col-sm-5">
			<input type="text" class="input-text"   placeholder="ICP备案登记号" id="icpNo" disabled="disabled"/>
		</div>
	</div>
	<!-- <div class="row cl" >
		<label class="form-label col-xs-4 col-sm-3">注册地址：</label>
		<div class="formControls col-xs-8 col-sm-9 ">
			<span class="select-box" style="width:150px;">
				<select class="select inputDisabled" name="adminRole" size="1" id="s_province">
				</select>
			</span>
			<span class="select-box" style="width:150px;">
				<select class="select inputDisabled" name="adminRole" size="1" id="s_city"></select>
			</span>
			<span class="select-box" style="width:150px;">
				<select class="select inputDisabled" name="adminRole" size="1" id="s_county"></select>
			</span>
		</div>
	</div> -->
	<!--<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>是否被冻结：</label>
		<div class="formControls col-xs-4 col-sm-5">
			<button id="userType" class="btn btn-primary radius inputDisabled"></button>
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>是否可以使用：</label>
		<div class="formControls col-xs-4 col-sm-5">
			<button id="type" class="btn btn-primary radius inputDisabled"></button>
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>是否被删除：</label>
		<div class="formControls col-xs-4 col-sm-5">
			<button id="isdel" class="btn btn-success radius inputDisabled" value=""></button>
		</div>
	</div>-->
	
	<!--<div class="row cl">
		<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
			<input id="changemes" class="btn btn-primary radius" type="button" value="&nbsp;&nbsp;修改&nbsp;&nbsp;">
			<input id="updata" class="btn btn-primary radius" type="button" value="&nbsp;&nbsp;保存&nbsp;&nbsp;">
		</div>
	</div>-->
	</form>
</article>
<script class="resources library" src="../js/area.js" type="text/javascript"></script>
<script>
	$(function() {
		$(".inputDisabled").attr("disabled","disabled");
		var account = $.cookie('user__userName');
		var md5 = $.cookie('user__code');
		$.ajax({
			type: 'POST',
			url: $.webConfig.basicUrl+'/chuyangPay/user/getUserDB',
			data: {
				account: account,
				md5: md5
			},
			dataType: "json",
			success: function(data) {	
				if(data['code'] == 200) {
					$('#userMerchantNo').html(data['data']['userMerchantNo']);
					$('#account').val(data['data']['account']);
//							$('#userName').val(data['data']['userName']);
//							$('#id').val(data['data']['id']);
					$('#mailbox').val(data['data']['mailbox']);
					$('#phone').val(data['data']['phone']);
					$('#icpNo').val(data['data']['icpNo']);
					$('#s_province').html('<option value="' + data['data']['country'] + '">' + data['data']['country'] + '</option>');						
					$('#s_city').html('<option value="' + data['data']['province'] + '">' + data['data']['province'] + '</option>');
					$('#s_county').html('<option value="' + data['data']['city'] + '">' + data['data']['city'] + '</option>');
				} else {
					layer.alert(data['msc']);
				}
			},
			error: function(err) {
				console.log(err);
			}
		})
	})
//	$("#changemes").click(function(){
//		$(".inputDisabled").removeAttr("disabled","disabled");
////		$('#s_province').html('>');						
////		$('#s_city').html('');
////		$('#s_county').html('');
//		_init_area();
//	})
//	$("#updata").click(function(){
//		account = $.cookie('user__userName');
//		 md5 = $.cookie('user__code');
//		 mailbox=$('#mailbox').val();
//		 phone=$('#phone').val();
//		 country=$('#s_province').val();
//		 province=$('#s_city').val();
//		 city=$('#s_county').val();
//		 $.ajax({
//		 	type:'post',
//			url:$.webConfig.basicUrl+"/chuyangPay/user/updateUserDB" ,
//			data: {
//				account:account,
//				md5:md5,
//				mailbox:mailbox,
//				phone:phone,
//				country:country,
//				province:province,
//				city:city
//			},
//			dataType: "json",
//			success: function(data){
//				if(data['code'] == 200) {
//					layer.msg('成功!',{icon:1,time:1000});
//				}
//				else{
//					layer.alert(data['msc']);
//				}
//			},
//			error: function(XmlHttpRequest, textStatus, errorThrown){
//				layer.msg('error!',{icon:2,time:1000});
//			}
//		 })
//	})
</script>
</body>
</html>